# -*- coding: utf-8 -*-

import os

from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
import wsgiref.handlers


# widoki dla każdej strony
class MainPage(webapp.RequestHandler):
    def get(self):
        path = os.path.join(os.path.dirname(__file__), 'templates/main.html')
        self.response.out.write(template.render(path, {}))
		
		
class Contact(webapp.RequestHandler):
    def get(self):
        path = os.path.join(os.path.dirname(__file__), 'templates/contact.html')
        self.response.out.write(template.render(path, {}))


# sterowanie URL-ami
application = webapp.WSGIApplication([
	('/', MainPage),
	('/kontakt/', Contact),
], debug=True)


# uruchomienie aplikacji
def main():
  wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__':
  main()
